-- GENERATED SPELL FOR [Sporebat] --


function spell0_18128(pUnit, Event) --@Energizing Spores,n/a--
pUnit:FullCastSpellOnTarget(35336,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18128', 625, 1)
end

function spell1_18128(pUnit, Event) --@Spore Cloud,n/a--
pUnit:FullCastSpellOnTarget(35394,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18128', 21000, 1)
end

function Sorts_18128(pUnit, Event)
local choix_sorts_18128 = math.random(0, 1)
if choix_sorts_18128 == 0 then
pUnit:RegisterEvent('spell0_18128', 1, 1)
end
if choix_sorts_18128 == 1 then
pUnit:RegisterEvent('spell1_18128', 1, 1)
end
end

function mob18128_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18128', math.random(1500, 3000), 1)
end

function mob18128_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18128_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18128_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18128, 1, 'mob18128_Action')
RegisterUnitEvent(18128, 2, 'mob18128_Leave')
RegisterUnitEvent(18128, 3, 'mob18128_Kill')
RegisterUnitEvent(18128, 4, 'mob18128_Die')
